package com.teemor.blog.service.impl;

import com.teemor.blog.bean.condition.TbTagCondition;
import com.teemor.blog.bean.entity.TbTag;
import com.teemor.blog.mapper.TbTagMapper;
import com.teemor.blog.service.ITagService;
import java.util.List;

import org.springframework.stereotype.Service;

/**
 * @author: zhoulk
 * @Description: 原子服务实现
 * @date: 2020/03/24 17:33:32
 */
@Service
public class TagServiceImpl implements ITagService {
    private TbTagMapper tbTagMapper;

    @Override
    public int countTag(TbTagCondition condition) {
        return tbTagMapper.countTagByCondition(condition);
    }

    @Override
    public List<TbTag> qryTags(TbTagCondition condition) {

        return tbTagMapper.selectTagByCondition(condition);
    }

    @Override
    public TbTag qryTagById(Integer id) {
        return tbTagMapper.selectTagById(id);
    }

    @Override
    public int addTag(TbTag inParam) {
        return tbTagMapper.insertTag(inParam);
    }

    @Override
    public int updTagById(TbTag inParam) {
        return tbTagMapper.updateTagById(inParam);
    }
}